


using System;
using SubSonic.Schema;
using System.Collections.Generic;
using SubSonic.DataProviders;
using System.Data;

namespace OrmSmackdown.SubSonic3 {
	
        /// <summary>
        /// Table: Messages
        /// Primary Key: MessageId
        /// </summary>

        public class MessagesTable: DatabaseTable {
            
            public MessagesTable(IDataProvider provider):base("Messages",provider){
                ClassName = "Message";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("MessageId", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("SenderUserId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("Subject", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiString,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 255
                });

                Columns.Add(new DatabaseColumn("Body", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiString,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 2147483647
                });
                    
                
                
            }
            
            public IColumn MessageId{
                get{
                    return this.GetColumn("MessageId");
                }
            }
				
   			public static string MessageIdColumn{
			      get{
        			return "MessageId";
      			}
		    }
            
            public IColumn SenderUserId{
                get{
                    return this.GetColumn("SenderUserId");
                }
            }
				
   			public static string SenderUserIdColumn{
			      get{
        			return "SenderUserId";
      			}
		    }
            
            public IColumn Subject{
                get{
                    return this.GetColumn("Subject");
                }
            }
				
   			public static string SubjectColumn{
			      get{
        			return "Subject";
      			}
		    }
            
            public IColumn Body{
                get{
                    return this.GetColumn("Body");
                }
            }
				
   			public static string BodyColumn{
			      get{
        			return "Body";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: Addresses
        /// Primary Key: AddressId
        /// </summary>

        public class AddressesTable: DatabaseTable {
            
            public AddressesTable(IDataProvider provider):base("Addresses",provider){
                ClassName = "Address";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("AddressId", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("PersonId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("IsDefault", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Boolean,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("Line1", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiString,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 128
                });

                Columns.Add(new DatabaseColumn("Line2", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiString,
	                IsNullable = true,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 128
                });

                Columns.Add(new DatabaseColumn("City", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiString,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 128
                });

                Columns.Add(new DatabaseColumn("State", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiString,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 2
                });

                Columns.Add(new DatabaseColumn("ZipCode", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiStringFixedLength,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 5
                });

                Columns.Add(new DatabaseColumn("ZipCodePlusFour", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiStringFixedLength,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 4
                });
                    
                
                
            }
            
            public IColumn AddressId{
                get{
                    return this.GetColumn("AddressId");
                }
            }
				
   			public static string AddressIdColumn{
			      get{
        			return "AddressId";
      			}
		    }
            
            public IColumn PersonId{
                get{
                    return this.GetColumn("PersonId");
                }
            }
				
   			public static string PersonIdColumn{
			      get{
        			return "PersonId";
      			}
		    }
            
            public IColumn IsDefault{
                get{
                    return this.GetColumn("IsDefault");
                }
            }
				
   			public static string IsDefaultColumn{
			      get{
        			return "IsDefault";
      			}
		    }
            
            public IColumn Line1{
                get{
                    return this.GetColumn("Line1");
                }
            }
				
   			public static string Line1Column{
			      get{
        			return "Line1";
      			}
		    }
            
            public IColumn Line2{
                get{
                    return this.GetColumn("Line2");
                }
            }
				
   			public static string Line2Column{
			      get{
        			return "Line2";
      			}
		    }
            
            public IColumn City{
                get{
                    return this.GetColumn("City");
                }
            }
				
   			public static string CityColumn{
			      get{
        			return "City";
      			}
		    }
            
            public IColumn State{
                get{
                    return this.GetColumn("State");
                }
            }
				
   			public static string StateColumn{
			      get{
        			return "State";
      			}
		    }
            
            public IColumn ZipCode{
                get{
                    return this.GetColumn("ZipCode");
                }
            }
				
   			public static string ZipCodeColumn{
			      get{
        			return "ZipCode";
      			}
		    }
            
            public IColumn ZipCodePlusFour{
                get{
                    return this.GetColumn("ZipCodePlusFour");
                }
            }
				
   			public static string ZipCodePlusFourColumn{
			      get{
        			return "ZipCodePlusFour";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: Portals
        /// Primary Key: PortalId
        /// </summary>

        public class PortalsTable: DatabaseTable {
            
            public PortalsTable(IDataProvider provider):base("Portals",provider){
                ClassName = "Portal";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("PortalId", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("PortalName", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiString,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 50
                });

                Columns.Add(new DatabaseColumn("AdminUserId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });
                    
                
                
            }
            
            public IColumn PortalId{
                get{
                    return this.GetColumn("PortalId");
                }
            }
				
   			public static string PortalIdColumn{
			      get{
        			return "PortalId";
      			}
		    }
            
            public IColumn PortalName{
                get{
                    return this.GetColumn("PortalName");
                }
            }
				
   			public static string PortalNameColumn{
			      get{
        			return "PortalName";
      			}
		    }
            
            public IColumn AdminUserId{
                get{
                    return this.GetColumn("AdminUserId");
                }
            }
				
   			public static string AdminUserIdColumn{
			      get{
        			return "AdminUserId";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: Recipients
        /// Primary Key: RecipientId
        /// </summary>

        public class RecipientsTable: DatabaseTable {
            
            public RecipientsTable(IDataProvider provider):base("Recipients",provider){
                ClassName = "Recipient";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("RecipientId", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("UserId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("MessageId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });
                    
                
                
            }
            
            public IColumn RecipientId{
                get{
                    return this.GetColumn("RecipientId");
                }
            }
				
   			public static string RecipientIdColumn{
			      get{
        			return "RecipientId";
      			}
		    }
            
            public IColumn UserId{
                get{
                    return this.GetColumn("UserId");
                }
            }
				
   			public static string UserIdColumn{
			      get{
        			return "UserId";
      			}
		    }
            
            public IColumn MessageId{
                get{
                    return this.GetColumn("MessageId");
                }
            }
				
   			public static string MessageIdColumn{
			      get{
        			return "MessageId";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: PortalPeopleXref
        /// Primary Key: PersonId
        /// </summary>

        public class PortalPeopleXrefTable: DatabaseTable {
            
            public PortalPeopleXrefTable(IDataProvider provider):base("PortalPeopleXref",provider){
                ClassName = "PortalPeopleXref";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("PortalId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("PersonId", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });
                    
                
                
            }
            
            public IColumn PortalId{
                get{
                    return this.GetColumn("PortalId");
                }
            }
				
   			public static string PortalIdColumn{
			      get{
        			return "PortalId";
      			}
		    }
            
            public IColumn PersonId{
                get{
                    return this.GetColumn("PersonId");
                }
            }
				
   			public static string PersonIdColumn{
			      get{
        			return "PersonId";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: PortalPeopleXref_LS
        /// Primary Key: PortalPeopleXrefId
        /// </summary>

        public class PortalPeopleXref_LSTable: DatabaseTable {
            
            public PortalPeopleXref_LSTable(IDataProvider provider):base("PortalPeopleXref_LS",provider){
                ClassName = "PortalPeopleXref_L";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("PortalPeopleXrefId", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("PortalId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("PersonId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });
                    
                
                
            }
            
            public IColumn PortalPeopleXrefId{
                get{
                    return this.GetColumn("PortalPeopleXrefId");
                }
            }
				
   			public static string PortalPeopleXrefIdColumn{
			      get{
        			return "PortalPeopleXrefId";
      			}
		    }
            
            public IColumn PortalId{
                get{
                    return this.GetColumn("PortalId");
                }
            }
				
   			public static string PortalIdColumn{
			      get{
        			return "PortalId";
      			}
		    }
            
            public IColumn PersonId{
                get{
                    return this.GetColumn("PersonId");
                }
            }
				
   			public static string PersonIdColumn{
			      get{
        			return "PersonId";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: People
        /// Primary Key: PersonId
        /// </summary>

        public class PeopleTable: DatabaseTable {
            
            public PeopleTable(IDataProvider provider):base("People",provider){
                ClassName = "Person";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("PersonId", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("FirstName", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiString,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 50
                });

                Columns.Add(new DatabaseColumn("LastName", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiString,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 50
                });

                Columns.Add(new DatabaseColumn("Email", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiString,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 128
                });

                Columns.Add(new DatabaseColumn("CompanyId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int32,
	                IsNullable = true,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("RoleId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int32,
	                IsNullable = true,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("ManagerPersonId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int32,
	                IsNullable = true,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("UserType", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiStringFixedLength,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 2
                });
                    
                
                
            }
            
            public IColumn PersonId{
                get{
                    return this.GetColumn("PersonId");
                }
            }
				
   			public static string PersonIdColumn{
			      get{
        			return "PersonId";
      			}
		    }
            
            public IColumn FirstName{
                get{
                    return this.GetColumn("FirstName");
                }
            }
				
   			public static string FirstNameColumn{
			      get{
        			return "FirstName";
      			}
		    }
            
            public IColumn LastName{
                get{
                    return this.GetColumn("LastName");
                }
            }
				
   			public static string LastNameColumn{
			      get{
        			return "LastName";
      			}
		    }
            
            public IColumn Email{
                get{
                    return this.GetColumn("Email");
                }
            }
				
   			public static string EmailColumn{
			      get{
        			return "Email";
      			}
		    }
            
            public IColumn CompanyId{
                get{
                    return this.GetColumn("CompanyId");
                }
            }
				
   			public static string CompanyIdColumn{
			      get{
        			return "CompanyId";
      			}
		    }
            
            public IColumn RoleId{
                get{
                    return this.GetColumn("RoleId");
                }
            }
				
   			public static string RoleIdColumn{
			      get{
        			return "RoleId";
      			}
		    }
            
            public IColumn ManagerPersonId{
                get{
                    return this.GetColumn("ManagerPersonId");
                }
            }
				
   			public static string ManagerPersonIdColumn{
			      get{
        			return "ManagerPersonId";
      			}
		    }
            
            public IColumn UserType{
                get{
                    return this.GetColumn("UserType");
                }
            }
				
   			public static string UserTypeColumn{
			      get{
        			return "UserType";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: Performance
        /// Primary Key: PerformanceId
        /// </summary>

        public class PerformanceTable: DatabaseTable {
            
            public PerformanceTable(IDataProvider provider):base("Performance",provider){
                ClassName = "Performance";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("PerformanceId", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("OrmName", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiString,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 128
                });

                Columns.Add(new DatabaseColumn("Action", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiString,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 128
                });

                Columns.Add(new DatabaseColumn("MilliSeconds", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });
                    
                
                
            }
            
            public IColumn PerformanceId{
                get{
                    return this.GetColumn("PerformanceId");
                }
            }
				
   			public static string PerformanceIdColumn{
			      get{
        			return "PerformanceId";
      			}
		    }
            
            public IColumn OrmName{
                get{
                    return this.GetColumn("OrmName");
                }
            }
				
   			public static string OrmNameColumn{
			      get{
        			return "OrmName";
      			}
		    }
            
            public IColumn Action{
                get{
                    return this.GetColumn("Action");
                }
            }
				
   			public static string ActionColumn{
			      get{
        			return "Action";
      			}
		    }
            
            public IColumn MilliSeconds{
                get{
                    return this.GetColumn("MilliSeconds");
                }
            }
				
   			public static string MilliSecondsColumn{
			      get{
        			return "MilliSeconds";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: Roles
        /// Primary Key: RoleId
        /// </summary>

        public class RolesTable: DatabaseTable {
            
            public RolesTable(IDataProvider provider):base("Roles",provider){
                ClassName = "Role";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("RoleId", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("RoleName", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiString,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 50
                });

                Columns.Add(new DatabaseColumn("IsForPortal", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Boolean,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("IsForContact", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Boolean,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });
                    
                
                
            }
            
            public IColumn RoleId{
                get{
                    return this.GetColumn("RoleId");
                }
            }
				
   			public static string RoleIdColumn{
			      get{
        			return "RoleId";
      			}
		    }
            
            public IColumn RoleName{
                get{
                    return this.GetColumn("RoleName");
                }
            }
				
   			public static string RoleNameColumn{
			      get{
        			return "RoleName";
      			}
		    }
            
            public IColumn IsForPortal{
                get{
                    return this.GetColumn("IsForPortal");
                }
            }
				
   			public static string IsForPortalColumn{
			      get{
        			return "IsForPortal";
      			}
		    }
            
            public IColumn IsForContact{
                get{
                    return this.GetColumn("IsForContact");
                }
            }
				
   			public static string IsForContactColumn{
			      get{
        			return "IsForContact";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: Companies
        /// Primary Key: CompanyId
        /// </summary>

        public class CompaniesTable: DatabaseTable {
            
            public CompaniesTable(IDataProvider provider):base("Companies",provider){
                ClassName = "Company";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("CompanyId", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("CompanyName", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.AnsiString,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 50
                });
                    
                
                
            }
            
            public IColumn CompanyId{
                get{
                    return this.GetColumn("CompanyId");
                }
            }
				
   			public static string CompanyIdColumn{
			      get{
        			return "CompanyId";
      			}
		    }
            
            public IColumn CompanyName{
                get{
                    return this.GetColumn("CompanyName");
                }
            }
				
   			public static string CompanyNameColumn{
			      get{
        			return "CompanyName";
      			}
		    }
            
                    
        }
        
}